package model.semantics.binary;

import model.semantics.BinaryOperation;


/**
 * Returns modulo of division, the remainder.
 * 
 * @author Anne Weng
 */
public class Mod extends BinaryOperation
{
	protected boolean leftAssociative = true;

	public Mod(int precedence)
	{
		super(precedence);
	}
	
    @Override
    protected double evaluateValue (double left, double right)
    {
    	if (right == 0)
    		return 0;
        return Math.IEEEremainder(left, right);
    }
}
